package com.example.component;

/**
 * Created by fongjx on 2021/6/25.
 */
public class File extends Root{
    public File(String name){
        super(name);
    }
    @Override
    void addFile(Root root) {

    }

    @Override
    void removeFile(Root root) {

    }

    @Override
    void display(int depth) {
        final StringBuilder stringBuilder = new StringBuilder();
        for(int i = 0; i < depth; i++){
            stringBuilder.append("--");
        }
        System.out.println(stringBuilder.toString() + this.getName());
    }
}
